package com.gxuwz.volunteer.service.impl;

import com.gxuwz.volunteer.entity.User;
import com.gxuwz.volunteer.mapper.UserMapper;
import com.gxuwz.volunteer.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserProfile(Integer userId) {
        return userMapper.getUserProfile(userId);
    }

    @Override
    public void updateUserProfile(Integer userId, User user) {
        userMapper.updateUserProfile(userId, user);
    }

    @Override
    public String getUserStats(Integer userId) {
        return userMapper.getUserStats(userId);
    }

    @Override
    public List<String> getUserActivities(Integer userId, String params) {
        return userMapper.getUserActivities(userId, params);
    }

    @Override
    public List<User> getUsers(String role) {
        return userMapper.getUsers(role);
    }

    @Override
    public void createUser(User user) {
        userMapper.createUser(user);
    }

    @Override
    public void deleteUser(Integer userId) {
        userMapper.deleteUser(userId);
    }
}
